<?php
/**
 * The directory in which your application specific resources are located.
 * The application directory must contain the config/ko.php file.
 *
 * @see  http://docs.kophp.com/install#application
 */
$application = 'application';

/**
 * The directory in which the Ko resources are located. The system
 * directory must contain the classes/ko.php file.
 *
 * @see  http://docs.kophp.com/install#system
 */
$system = 'libraries';

/**
 * The directory in which the Ko resources are located. The system
 * directory must contain the classes/ko.php file.
 *
 * @see  http://docs.kophp.com/install#system
 */
$data = 'data';

/**
 * Set the PHP error reporting level. If you set this in php.ini, you remove this.
 * @see  http://php.net/error_reporting
 *
 * When developing your application, it is highly recommended to enable notices
 * and strict warnings. Enable them by using: E_ALL | E_STRICT
 *
 * In a production environment, it is safe to ignore notices and strict warnings.
 * Disable them by using: E_ALL ^ E_NOTICE
 */
error_reporting( E_ALL | E_STRICT);

/**
 * End of standard configuration! Changing any of the code below should only be
 * attempted by those with a working knowledge of Ko internals.
 *
 * @see  http://docs.kophp.com/bootstrap
 */

// Set the full path to the docroot
define('DOC_ROOT', realpath(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR);

// Make the application relative to the docroot
if (! is_dir($application) && is_dir(DOC_ROOT . $application))
    $application = DOC_ROOT . $application;
    
// Make the system relative to the docroot
if (! is_dir($system) && is_dir(DOC_ROOT . $system))
    $system = DOC_ROOT . $system;
    
// Make the system relative to the docroot
if (! is_dir($data) && is_dir(DOC_ROOT . $data))
    $data = DOC_ROOT . $data;

// Define the absolute paths for configured directories
define('APP_PATH', realpath($application) . DIRECTORY_SEPARATOR);
define('SYS_PATH', realpath($system) . DIRECTORY_SEPARATOR);
define('DATA_PATH', realpath($data) . DIRECTORY_SEPARATOR);

// Clean up the configuration vars
unset($application, $system);

//if (file_exists('install.php')) {
//    // Load the installation check
//    return include 'install.php';
//}

// Bootstrap the application
require_once APP_PATH . 'bootstrap.php';
